//
//  EJSGoodsInfoTableViewCell.m
//  EnjoyShoppingStreet
//
//  Created by lifayu on 2017/12/26.
//  Copyright © 2017年 lifayu. All rights reserved.
//

#import "EJSGoodsInfoTableViewCell.h"

@implementation EJSGoodsInfoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setGoodsName:(NSString *)goodsName price:(NSString *)price originPrice:(NSString *)originPrice{
    self.goodsNameLabel.text = goodsName;
    if(price){
        self.priceLabel.text = [NSString stringWithFormat:@"€ %@",price];
    }
    if(originPrice && originPrice.floatValue > 0){
        self.originPriceLabel.hidden = NO;
        NSAttributedString *attr = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"€ %@",originPrice] attributes:@{NSStrikethroughStyleAttributeName:@(NSUnderlinePatternSolid | NSUnderlineStyleSingle),NSStrikethroughColorAttributeName:UIColorFromRGB(0xA4A4A4)}];
        self.originPriceLabel.attributedText = attr;
    }else{
        self.originPriceLabel.hidden = YES;
    }
}

@end
